package com.boarsoft.boar.gateway.wechat.common;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WechatConfig {
	private final static Logger log = LoggerFactory.getLogger(WechatConfig.class);
	private static Properties prop;
	//
	// public static int SQL_PAGE_SIZE = 100;
	public static String FILE_PATH = "./";
	public static String APP_ROOT = "./";

	public static void init(InputStream is) {
		if (prop == null) {
			prop = new Properties();
		}
		try {
			prop.load(is);
		} catch (IOException e) {
			log.error("Error on load system config.", e);
			throw new RuntimeException(e);
		}
	}

	public static String getProperty(String name) {
		return prop.getProperty(name);
	}
}